package com.steellee.leeexcel.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 模拟返回对象ExampleDtoone
 */
@Data
public class ExampleDtoOneDto implements Serializable {
    @ExcelProperty(value = "序号", index = 0)
    private String sort;
    @NotBlank(message = "计划类型不能为空! ")
    @ExcelProperty(value = "计划类型", index = 1)
    private String planType;
    @NotBlank(message = "制度级别不能为空! ")
    @Pattern(regexp = "^[监][管][检][查]$|^[监][管][评][估]$|^[监][管][走][访]$][^$")
    @ExcelProperty(value = "制度级别", index = 2)
    private String docLevel;

    @NotBlank(message = "规划制度名称不能为空! ")
    @ExcelProperty(value = "规划制度名称", index = 3)
    private String docName;
    @ExcelProperty(value = "计划说明", index = 4)
    @Pattern(regexp = "^\\d{1,10}\\.\\d{1,6}$|^\\d{1,10}$")
    private String planDesc;
    @NotNull(message = "计划开始时间不能为空! ")
    @ExcelProperty(value = "计划开始时间", index = 5)
    @DateTimeFormat("yyyy年MM月 dd日 HH时 mm分 ss秒")
    private Date planStartTime;
    @NotNull(message = "计划结束时间不能为空! ")
    @ExcelProperty(value = "计划结束时间", index = 6)
    @DateTimeFormat("yyyy年MM月 dd日 HH时 mm分 ss秒")
    private Date planEndTime;
    @ExcelProperty(value = "处理人", index = 7)
    @Size(max = 100)
    private String um;
}